﻿using System;
using System.Data;
using System.Data.SqlClient;

namespace zhangmenren.Db
{
        public class DBConfig
        {
            //ConfigurationManager.ConnectionStrings["Connection"].ConnectionString;
            private static string DefaultSqlConnectionString = @"Server=39.98.43.168;database=zhangmenren;uid=sa;pwd=Ab2018zhang;";
            //Server=192.168.1.250;database=FXSkyEyeInternational;uid=vincent;pwd=vincent;
            public static IDbConnection GetSqlConnection(string sqlConnectionString = null)
            {
                if (string.IsNullOrWhiteSpace(sqlConnectionString))
                {
                    sqlConnectionString = DefaultSqlConnectionString;
                }
                IDbConnection conn = new SqlConnection(sqlConnectionString);
                conn.Open();
                return conn;
            }
        }
}
